home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / mcu332 / 332doc.arc / 332BUGA1 < prev    next >
Text File  |  1989-12-19  |  17KB  |  533 lines

  1.                                                                       
  2.   DEBUG MONITOR USER'S MANUAL    MOTOROLA
  3.   C-1     M68332BUG
  4.  
  5.                                                                       
  6.   DEBUG MONITOR USER'S MANUAL    MOTOROLA
  7.   M68332BUG    C-1
  8.  
  9.                                                                       
  10.   DEBUG MONITOR USER'S MANUAL    MOTOROLA
  11.   A-1     M68332BUG
  12.  
  13.                                                                       
  14.   DEBUG MONITOR USER'S MANUAL    MOTOROLA
  15.   M68332BUG    A-1
  16.  
  17.  
  18. APPENDIX C
  19. USER CUSTOMIZATION
  20.  
  21.  
  22. INTRODUCTION
  23.  
  24. Within the 332Bug certain operating parameters may be customized for the user's particular 
  25. situation.  This appendix details the customization features of 332Bug.  An IBM-PC or 
  26. compatible host computer with the Motorola EVSbug332 software, BCCDI, and PFB are 
  27. required to reprogram the EPROM on the BCC.  This appendix assumes the user is using the 
  28. ProComm terminal emulation program on the host computer to communicate with 332Bug 
  29. and is familiar with the following; 332Bug, ProComm, MS-DOS, and EVSbug332.
  30.  
  31.  
  32.  
  33.  
  34. CAUTION
  35.  
  36. Failure to incorporate changes as specified may cause malfunctions in the 
  37. 332Bug.  Novices should not attempt to customize 332Bug.
  38.  
  39.  
  40.  
  41.  
  42. The user customization area is the first 512 bytes of 332Bug ($60000-$601FF), see Table C-
  43. 1.  For brevity's sake, all entries have been shown as an offset value from the $60000 base 
  44. address of 332Bug.  The source code equivalent of the customization area is available on the 
  45. Motorola FREEWARE BBS at (512) 891-FREE, i.e.. (512) 891-3733 under the archive 
  46. filename 332BUG1.ARC.  Future updates for 332Bug will also be available on the 
  47. FREEWARE BBS under the archive filename 332BUGxx.ARC.  The EVSbug332 program is 
  48. also available on the FREEWARE BBS in the archive file EVSBUG332.ARC.  The 
  49. FREEWARE line operates continuously except for maintenance periods and is set up for 300-
  50. 2400 baud, 8-bit, no parity, and 1 stop bit.
  51.  
  52. Because there are two versions of the M68332BCC, there are two sets of chip select tables; 
  53. one set for Rev. A and one set for Rev. B.  332Bug power-up initializes the common CSBOOT 
  54. chip select and CS0/CS1 (see Rev. A table values).  332Bug then tests for RAM at location 
  55. $0 to determine if the hardware is Rev. A or Rev. B.  Chip select initialization then proceeds 
  56. using the values from the proper table.  The only changes required by the user are to the 
  57. WAIT CYCLES or BASE ADDRESS fields for their platform board (PFB) sockets, or to use an 
  58. unused chip select.
  59.  
  60. 332BUG CUSTOMIZATION
  61.  
  62. The general procedure for customizing 332Bug is as follows:
  63.  
  64. 1.    Copy the parameter area from the 332Bug EPROM to RAM by entering the 
  65. following command:
  66.  
  67.     332Bug>BM 60000 601FF 4000<CR>
  68.  
  69.  
  70. 2.    Modify the parameters in RAM using the offsets shown in Table C-1.  For 
  71. example, the CHECKSUM value would begin at location $4000 plus offset 
  72. $0E, or $400E.  Thus the word at $400E must be changed to $FFFF so a 
  73. new checksum value for the customized 332Bug can be calculated.  Enter 
  74. the following command to change the CHECKSUM value.
  75.  
  76.     332Bug>MS 400E FFFF<CR>
  77.  
  78.     Change the SIGNON message to indicate customization has been 
  79. performed.  Change the spaces after "Version  1.01" to read ".XX  <title>", 
  80. where "XX" is your customized version number starting with 01 and <title> is 
  81. the name of your company or school/lab.
  82.  
  83.  
  84. 3.    Create an S-record file of the changes on the host computer by entering the 
  85. ALT-F1 key on the host computer terminal (for ProComm emulator program) 
  86. to open a log file.  Enter the file name 332BUG1.MX and then complete the 
  87. 332Bug DU command by pressing <CR>.  The offset of 5C000 is required to 
  88. create the S-records with the proper starting address of $60000 for 
  89. EVSbug332.
  90.  
  91.     332Bug>DU 4000 41FF '332BUG1.MX' ,5C000<ALT-F1><CR>
  92.  
  93. 4.    Create an S-record file of the rest of 332Bug on the host computer by 
  94. entering the ALT-F1 key on the host computer terminal (for ProComm 
  95. emulator program) to open a log file.  Enter the file name 332BUG23.MX 
  96. and then complete the 332Bug DU command by pressing <CR>. 
  97.  
  98.     332Bug>DU 60200 7FFFF '332BUG23.MX'<ALT-F1><CR>
  99.  
  100.  
  101. 5.    If desired, the two S-record files can be edited on the host computer to 
  102. remove the "Effective address" lines at the beginning of the file and the 
  103. 332Bug> prompt at the end, but it is not required.  If the two S-record files 
  104. are concatenated into one file, edit the first file to remove the S8 termination 
  105. record at the end of the file.
  106.  
  107. 6.    Verify the customized S-record file, 332BUG1.MX, by entering the 
  108. command shown below.  The -5C000 offset is required to relocate the 
  109. verification from the $60000 base address of the S-records to the RAM 
  110. change area at $4000.
  111.  
  112.     332Bug>VE -5C000<CR>
  113.  
  114.     Enter the terminal emulator's escape key to return to the host computer's 
  115. operating system (ALT-F4 for ProComm).  Then enter the host command to 
  116. send the S-record file to the port where the BCC is connected (type 
  117. 332bug1.mx >com1, when the BCC is connected to the com1 port).
  118.  
  119.     After the file has been sent, restart the terminal emulation program by 
  120. entering EXIT on the host computer.  Then enter two <CR>'s to signal the 
  121. 332Bug that verification is complete and the terminal emulator program is 
  122. ready to receive the status message.
  123.  
  124.         <CR><CR>
  125.         Verify passes.
  126.         332Bug>
  127.  
  128.  
  129. 7.    Verify the main S-record file, 332BUG23.MX, by entering the command 
  130. shown below.  No offset is required.
  131.  
  132.         332Bug>VE<CR>
  133.  
  134.     Enter the terminal emulator's escape key to return to the host computer's 
  135. operating system (ALT-F4 for ProComm).  Then enter the host computer 
  136. command to send the S-record file to the BCC (type 332bug23.mx 
  137. >com1, when the BCC is connected to the com1 port).
  138.  
  139.     After the file has been sent, restart the terminal emulation by entering EXIT 
  140. on the host computer.  Then enter two <CR>'s to signal the 332Bug that 
  141. verification is complete and the terminal emulator program is ready to 
  142. receive the status message.
  143.  
  144.         <CR><CR>
  145.         Verify passes.
  146.         332Bug>
  147.  
  148.  
  149. 8.    Follow the EVSbug332 directions for reprogramming the BCC EPROM using 
  150. the two S-record files, 332BUG1.MX and 332BUG23.MX.
  151.  
  152. 9.    Power up the newly programmed BCC and note the checksum value 
  153. indicated.  Repeat steps 1 through 8 above, to set the checksum to this value 
  154. but with the changes noted below.
  155.  
  156. Ñ    STEP 1:    No change.
  157.  
  158. Ñ    STEP 2:    Change checksum to the value noted on power-up 
  159. per the command below where "XXXX" is the value 
  160. noted.
  161.  
  162.         332Bug>MS 400E XXXX<CR>
  163.  
  164. Ñ    STEP 3:    Change the filename to 332BUG1C.MX.  To speed 
  165. up reprogramming, a temporary file consisting of only 
  166. the checksum word could be used by entering DU 
  167. 400E 400F 'TMP.MX' ,5C000<ALT-F1><CR> 
  168. after creating the 332BUG1C.MX file.
  169.  
  170. Ñ    STEP 4:    Skip this step.
  171.  
  172. Ñ    STEP 5:    No change.
  173.  
  174. Ñ    STEP 6:    No change.
  175.  
  176. Ñ    STEP 7:    This step is optional.
  177.  
  178. Ñ    STEP 8:    Only the checksum value needs to be programmed 
  179. using the indicated value.  Since the checksum was 
  180. set to the unprogrammed state of the EPROM 
  181. ($FFFF), programming can start immediately.  DO 
  182. NOT ERASE THE BCC EPROM!
  183.  
  184.  
  185. 10.    Power-up the BCC once again.  The checksum message should not 
  186. appear.
  187.  
  188. 11.    On the host computer, enter the following commands to update the two 
  189. 332Bug S-record files so they may be properly archived to a floppy disk for 
  190. safe keeping:
  191.  
  192.         C>DEL TMP.MX<CR>
  193.         C>DEL 332BUG1.MX<CR>
  194.         C>RENAME 332BUG1C.MX 332BUG1.MX<CR>
  195.         C>COPY 332BUG*.MX A:<CR>
  196.  
  197. 12.    The customization procedure is now complete.
  198.  
  199. CUSTOMIZATION TABLE
  200.  
  201. Table C-1.  332Bug Customization Area
  202.  
  203.     DEFAULT
  204. OFFSET    VALUE    MNEMONIC    DESCRIPTION
  205.  
  206. $00-03    $00002FFC    PWR_SSP    Power on/reset stack pointer
  207. $04-07    $00060090    PWR_PC    Power on/reset program counter
  208. $08-0B    $00020000    CODESIZE    Size of 332Bug ROM in bytes:
  209.                 Number of bytes for checksum calculation.
  210.                 Must be an even number of bytes.
  211. $0C-0D    $FFFF    CHECKALT    Checksum alternate:
  212.                 Change this if CHECKSUM should ever
  213.                 be calculated as $FFFF.
  214. $0E-0F    $9F8F    CHECKSUM    Checksum value:
  215.                 $FFFF = calculate new checksum value
  216.                 else checksum has been set.
  217.  
  218.  
  219. Old Chip Select Table (Rev. A BCC + Rev. A PFB)
  220.  
  221. $10-11    $0003    .CSBAR0    CS0    base address register value and
  222. $12-13    $5830    .CSOR0    .    option register value
  223. $14-15    $0003    .CSBAR1    CS1    base address register value and
  224. $16-17    $3830    .CSOR1    .    option register value
  225. $18-19    $0103    .CSBAR2    CS2    base address register value and
  226. $1A-1B    $6870    .CSOR2    .    option register value
  227. $1C-1D    $0103    .CSBAR3    CS3    base address register value and
  228. $1E-1F    $3030    .CSOR3    .    option register value
  229. $20-21    $0804    .CSBAR4    CS4    base address register value and
  230. $22-23    $5870    .CSOR4    .    option register value
  231. $24-25    $0804    .CSBAR5    CS5    base address register value and
  232. $26-27    $3870    .CSOR5    .    option register value
  233. $28-29    $FFE8    .CSBAR6    CS6    base address register value and
  234. $2A-2B    $783F    .CSOR6    .    option register value
  235. $2C-2D    $0000    .CSBAR7    CS7    base address register value and
  236. $2E-2F    $0000    .CSOR7    .    option register value
  237. $30-31    $FFF8    .CSBAR8    CS8    base address register value and
  238. $32-33    $680F    .CSOR8    .    option register value
  239. $34-35    $0000    .CSBAR9    CS9    base address register value and
  240. $36-37    $0000    .CSOR9    .    option register value
  241. $38-39    $0103    .CSBAR10    CS10 base address register value and
  242. $3A-3B    $5030    .CSOR10    .    option register value
  243.  
  244.  
  245.  
  246. Table C-1.  332Bug Customization Area (cont'd)
  247.  
  248.     DEFAULT
  249. OFFSET    VALUE    MNEMONIC    DESCRIPTION
  250.  
  251. Common Chip Select Table: (Rev. A BCC + Rev. A PFB) &
  252. (Rev. B BCC + Rev. B PFB)
  253.  
  254. $3C-3D    $0604    .CSBARBT    CSBOOT base address register value and
  255. $3E-3F    $68B0    .CSORBT    .    option register value
  256.  
  257.  
  258. New Chip Select Table: (Rev. B BCC + Rev. B PFB)
  259.  
  260. $40-41    $0003    CSBAR0$    CS0    base address register value and
  261. $42-43    $503E    CSOR0$    .    option register value
  262. $44-45    $0003    CSBAR1$    CS1    base address register value and
  263. $46-47    $303E    CSOR1$    .    option register value
  264. $48-49    $0003    CSBAR2$    CS2    base address register value and
  265. $4A-4B    $683E    CSOR2$    .    option register value
  266. $4C-4D    $0000    CSBAR3$    CS3    base address register value and
  267. $4E-4F    $0000    CSOR3$    .    option register value
  268. $50-51    $FFF8    CSBAR4$    CS4    base address register value and
  269. $52-53    $680F    CSOR4$    .    option register value
  270. $54-55    $FFE8    CSBAR5$    CS5    base address register value and
  271. $56-57    $783F    CSOR5$    .    option register value
  272. $58-59    $0804    CSBAR6$    CS6    base address register value and
  273. $5A-5B    $38F0    CSOR6$    .    option register value
  274. $5C-5D    $0804    CSBAR7$    CS7    base address register value and
  275. $5E-5F    $58F0    CSOR7$    .    option register value
  276. $60-61    $0103    CSBAR8$    CS8    base address register value and
  277. $62-63    $6870    CSOR8$    .    option register value
  278. $64-65    $0103    CSBAR9$    CS9    base address register value and
  279. $66-67    $3030    CSOR9$    .    option register value
  280. $68-69    $0103    CSBAR10$    CS10 base address register value and
  281. $6A-6B    $5030    CSOR10$    .    option register value
  282.  
  283. $6C-6F    $FFFFFFFF        <reserved>
  284.  
  285.  
  286. Standby RAM Module
  287.  
  288. $70-71    $FFFF    .RAMMCR    RAM module configuration register value
  289. $72-73    $FFFF    .RAMBAR    RAM array base address register value
  290.                 Bit 0    = 1 disables RAM array initialization
  291.                 = 0 enables  RAM array initialization
  292.  
  293.  
  294.  
  295. Table C-1.  332Bug Customization Area (cont'd)
  296.  
  297.     DEFAULT
  298. OFFSET    VALUE    MNEMONIC    DESCRIPTION
  299.  
  300. Periodic Interrupt Timer
  301.  
  302. $74-75    $0642    .PICR    Periodic interrupt control register value:
  303.                 Default value is set for level 6, vect. 66.
  304. $76-77    $0102    .PITR    Periodic interrupt timing  register value:
  305.                 Controls the "tick" time for the SYSCALL 
  306. timing functions ($4X).  Default value is set 
  307. for 125 milliseconds.
  308.  
  309.  
  310. ROM Auto Boot Vectors
  311.  
  312. $78-7B    $FFFFFFFF    RB_SP    ROM auto boot stack pointer value
  313. $7C-7F    $FFFFFFFF    RB_PC    ROM auto boot program counter value:
  314.                 Bit 0    = 1 disables auto boot (odd 
  315. address)
  316.                 = 0 enables auto boot  (even 
  317. address).  Enabling is equivalent to 
  318. changing the stack pointer (SP) and 
  319. program counter (PC) and entering 
  320. the GO command.
  321.  
  322.  
  323. Console Default Table for SCI  (CONSCI)
  324.  
  325. $80-83    $00001C0F    .PARMS    Parameter definition for below:
  326.                 Do not change this value.
  327. $84-85    $2580    .BAUD    Baud rate (in decimal):
  328.                 19200    =    $4B00
  329.                 9600    =    $2580
  330.                 4800    =    $12C0
  331.                 2400    =    $0960
  332.                 1200    =    $04B0
  333.                 600    =    $0258
  334.                 300    =    $012C
  335. $86    $00    .PARITY    Parity selection (see Table C-2):
  336.                 None    =    $00
  337.                 Even    =    $45    =    'E'
  338.                 Odd    =    $4F    =    'O'
  339. $87    $08    .DATA    Data bits (see Table C-2):
  340.                 8-bits    =    $08
  341.                 7-bits    =    $07
  342.  
  343.  
  344. Table C-1.  332Bug Customization Area (cont'd)
  345.  
  346.     DEFAULT
  347. OFFSET    VALUE    MNEMONIC    DESCRIPTION
  348.  
  349. Console Default Table for SCI  (CONSCI) (cont'd)
  350.  
  351. $88    $01    .STOP    Stop bits (see Table C-2):
  352.                 1-bit    =    $01
  353.                 2-bit    =    $02
  354. $89    $FF    .XON_ENB    XON/XOFF enable:
  355.                 enable    =    $FF
  356.                 disable    =    $00
  357. $8A    $11    .XON    XON   character (7-bit ASCII):
  358.                 ^Q    =    $11
  359. $8B    $13    .XOFF    XOFF character (7-bit ASCII):
  360.                 ^S    =    $13
  361.  
  362. $8C-8F    $FFFFFFFF        <reserved>
  363.  
  364. Power On Branch Vectors (PWR_XXX): no registers preserved
  365.  
  366. $90-95    $60FF0000E098    PWR_INI    BRA.L to MCU initialization routine:
  367.                 Returns to PWR_TTL (no stack usage!).
  368. $96-9B    $60FF00000004    PWR_TTL    BRA.L to title printing routine:
  369.                 Returns to PWR_TST (no stack usage!).
  370. $9C-A1    $60FF0000DD26    PWR_TST    BRA.L to self-test routine:
  371.                 Returns to PWR_GO (no stack usage!).
  372. $A2-A7    $60FF0000D93C    PWR_GO    BRA.L to 332Bug start up routine:
  373.                 Never returns.
  374. $A8-AD    all $FF's        BRA.L <reserved>
  375. $AE-B3    all $FF's        BRA.L <reserved>
  376. $B4-B9    all $FF's        BRA.L <reserved>
  377. $BA-BF    all $FF's        BRA.L <reserved>
  378.  
  379.  
  380. System Patch Area
  381.  
  382. $C0-16F    all $FF's    SYSPATCH    <reserved>
  383.  
  384.  
  385.  
  386. Table C-1.  332Bug Customization Area (cont'd)
  387.  
  388.     DEFAULT
  389. OFFSET    VALUE    MNEMONIC    DESCRIPTION
  390.  
  391. Sign On Text Message
  392.  
  393. $170-1FF        SIGNON    Text string in SYSCALL .WRITE format.
  394.  
  395. Default values shown in MASM assembly language format below except "^" has been 
  396. substituted for each space character (" ") to show exact spacing.  The Motorola copyright must 
  397. be preserved.
  398.  
  399. SIGNON    DC.B    SIGN$2-SIGN$1    Char. count = $8F
  400. SIGN$1    DC.B    $0D,$0A,$0A    CR,LF,LF
  401.     DC.B    '332Bug^Debugger/Diagnostics^-^Version^^1.01'  =43 chars
  402.     DCB.B    36,$20    Pad to end of line; 79-43= 36.
  403.     DC.B    $0D,$0A    CR,LF
  404.     DC.B    '^^^^(C)^Copyright^1989^by^Motorola^Inc.'
  405.     DCB.B    20,$20    Reserve rest of space.
  406. SIGN$2    EQU    *
  407.  
  408.  
  409.  
  410. COMMUNICATION FORMATS
  411.  
  412. Not all combinations of data bits, parity, and stop bits are valid for the M68332 SCI.  Table C-
  413. 2 details the legal combinations that can be used when customizing 332Bug.
  414.  
  415.  
  416.  
  417.  
  418.  
  419. Table C-2.  M68332 SCI Communication Formats
  420.  
  421.     CHARACTER
  422.     WIDTH    PARITY    STOP BIT    DESCRIPTION
  423.  
  424.     7    None    1    Invalid port setting
  425.     7    None    2
  426.     7    Even    1
  427.     7    Even    2
  428.     7    Odd    1
  429.     7    Odd    2
  430.     8    None    1
  431.     8    None    2
  432.     8    Even    1
  433.     8    Even    2    Invalid port setting
  434.     8    Odd    1
  435.     8    Odd    2    Invalid port setting
  436.  
  437.  
  438.  
  439. REV. A CHIP SELECTION SUMMARY
  440.  
  441. TABLE C-3 covers Rev. A of the M68332BCC Business Card Computer and M68332PFB 
  442. Platform Board.
  443.  
  444.  
  445.  
  446.  
  447.  
  448. TABLE C-3.  Rev. A Chip Selection Summary
  449.  
  450. SIGNAL        BOARD/CHIP    DESCRIPTION
  451.  
  452. CSBOOT    =    BCC U4    332Bug EPROM
  453. CS0    =    BCC U3    write enable for MSB=UPPER=EVEN    RAM
  454. CS1    =    BCC U2    write enable for LSB=LOWER=ODD    RAM
  455. CS2    =    PFB U1/U3    read enable for MSB/LSB=BOTH    RAMS
  456. CS3    =    PFB U1    write enable for LSB=LOWER=ODD    RAM
  457. CS4    =    PFB U4    read enable for MSB=UPPER=EVEN    RAM
  458. CS5    =    PFB U2    read enable for LSB=LOWER=ODD    RAM
  459. CS6    =    PFB U5    chip enable for MC68881/882
  460. CS7    =    <unused>
  461. CS8    =    PFB    ABORT pushbutton autovector
  462. CS9    =    <unused>
  463. CS10    =    PFB U3    write enable for MSB=UPPER=EVEN    RAM
  464.             . cut/jump U3-27 from CS4 to CS10 required.
  465.  
  466.  
  467. NOTE
  468.  
  469. U1/U2 = 120 nsec RAM with fast termination.
  470. U2/U4 = ROM laid-out wrong, can only be configured as 120 nsec 
  471. RAM.
  472.  
  473.  
  474.  
  475. REV. B CHIP SELECTION SUMMARY
  476.  
  477. TABLE C-3 covers Rev. B of the M68332BCC Business Card Computer and M68332PFB 
  478. Platform Board.
  479.  
  480.  
  481. TABLE C-4.  Rev. B Chip Selection Summary
  482.  
  483. SIGNAL        BOARD/CHIP    DESCRIPTION
  484.  
  485. CSBOOT    =    BCC U4    332Bug EPROM
  486. CS0    =    BCC U3    write enable for MSB=UPPER=EVEN    RAM
  487. CS1    =    BCC U2    write enable for LSB=LOWER=ODD    RAM
  488. CS2    =    BCC U2/U3    read enable for MSB/LSB=BOTH    RAMS
  489. CS3    =    <unused>
  490. CS4    =    PFB    ABORT pushbutton autovector
  491. CS5    =    PFB U5    chip enable for MC68881/882
  492.             . cut/jump U5-J3 from CS2 to CS5 required.
  493. CS6    =    PFB U2    read enable for LSB=LOWER=ODD    RAM
  494. CS7    =    PFB U4    read enable for MSB=UPPER=EVEN    RAM
  495. CS8    =    PFB U1/U3    read enable for MSB/LSB=BOTH    RAMS
  496. CS9    =    PFB U1    write enable for LSB=LOWER=ODD    RAM
  497. CS10    =    PFB U3    write enable for MSB=UPPER=EVEN    RAM
  498.  
  499.  
  500. NOTE
  501.  
  502. U1/U2 = 120 nsec RAM with fast termination.
  503. U2/U4 = 250 nsec ROM (or jumper selectable as RAM).
  504.  
  505.  
  506.  
  507. PFB REV. C COMPATIBILITY
  508.  
  509. PFB Rev. C boards have jumpers (J8 - J13) which when installed, make Rev. C PFB's 
  510. compatible with Rev. A PFB boards or Rev. B PFB boards.
  511.  
  512.  
  513. TABLE C-5.  PFB Rev. C Compatiblity 
  514.  
  515.                 PFB Rev. C
  516. Jumper    Jumpers    Jumpers
  517.         PFB    PFB     block not    installed for    installed for
  518.     BOARD REVISION    Rev. A    Rev. B    installed (1)    Rev. A    Rev. B
  519.  
  520.     BCC Rev. A    YES    NO    NO    YES    NO
  521.  
  522.     BCC Rev. B    NO    YES    YES    NO    YES
  523.  
  524.  
  525.     (1)  The default when no jumper block is installed is Rev. B.
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.